<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .level{
            text-align: center;
            margin: 100px auto;
        }
        .level span{
            cursor: pointer;
        }
    </style>
    <script src="./jquery.js"></script>
    <script>
        $(function(){
            $('.level span').each(function(){
                $(this).on('mouseover',function(){
                    var index = $(this).index()
                    for(var i=0;i<=index;i++){
                        $('.level span').eq(i).html('★')
                    }
                    for(var j=$('.level span').length;j>index;j--){
                        $('.level span').eq(i).html('☆')
                    }
                })
            })
        })
    </script>
</head>
<body>
    <!-- 搜狗输入法特殊符号☆★ -->
    <div class="level">
        <span>☆</span>
        <span>☆</span>
        <span>☆</span>
        <span>☆</span>
        <span>☆</span>
    </div>
</body>
</html>